package com.example.wechattakeaway.mapper;

import com.example.wechattakeaway.entity.MerDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MerDishMapper {
    //删除菜品
    int deleteByPrimaryKey(Integer dishId);

    //插入菜品
    int insert(MerDish merDish);

    int insertSelective(MerDish record);

    //根据id查询菜品
    MerDish selectByPrimaryKey(Integer dishId);

    //编辑菜品
    int updateByPrimaryKeySelective(MerDish merDish);

    int updateByPrimaryKey(MerDish record);

    //根据菜单id查询菜品列表
    List<MerDish> selectByMenuId(Integer menuId);

    //根据订菜单id更新菜品图片
    Integer UpdateDishPhotoById(@Param("disPhoto") String disPhoto,@Param("dishId") Integer dishId);
}